<?php
defined('_JEXEC') or die('Restricted access');
$id = JRequest::getVar('id');
$db = JFactory::getDBO();
$query = "SELECT a.auction_date, p.katno, p.model, p.stand, p.register_day, p.view_day, p.registry, p.km, p.comment FROM #__auction a INNER JOIN #__pr_product p ON a.product_id = p.id WHERE a.id = ". $id;
$db->setQuery($query);
$pro = $db->loadObject();
?>
<div style="width:1500px; margin:0px auto;">	
    <table style="width: 100%; color:#303030;" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="4">
            <img src="images/logo.jpg" alt=""/></td>
        </tr>
    </table>
    <hr/>
    <div style="margin-top:20px;">
        <table style=" color:#000; font-size:40px; text-transform:uppercase;" cellpadding="0" cellspacing="0">
            <tr>
                <td>Auktions dato:</td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->auction_date;?></td>
            </tr>
            <tr>
                <td>Katalognummer:</td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->katno;?></td>		
            </tr>

            <tr>
                <td style="vertical-align:top;">Mærke/Model:</td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->model;?></td>					
            </tr>
            <tr>
                <td>Stand/Kategori:</td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->stand;?></td>
            </tr>
            <tr>
                <td>Km.stand: </td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->km;?></td>
            </tr>
            <tr>
                <td>Registrering: </td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->register_day;?></td>
            </tr>
            <tr>
                <td>Seneste syn:</td>
                <td style="font-weight:bold; font-size:80px; line-height:70px;"><?php echo $pro->view_day;?></td>
            </tr>
            <tr>
                <td style="vertical-align:text-bottom">Bemærkninger:</td>
                <td><?php echo $pro->comment;?></td>
            </tr>
        </table>
    </div>
</div>
<script language="javascript">
	window.print();
	window.onfocus = function() { window.close(); }
</script>